From ce2d1d4e5c9fc001df5334fef0d1504e0da1b629 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 1 Jan 2019 19:15:40 +0100 Subject: [PATCH] palette: allow a NULL space in babl_new_palette_with_space() --- babl/babl-palette.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/babl/babl-palette.c b/babl/babl-palette.c index a53f654..d03ad1d 100644 --- a/babl/babl-palette.c +++ b/babl/babl-palette.c @@ -727,6 +727,9 @@ const Babl *babl_new_palette_with_space (const char *name, char cname[64]; + if (!space) + space = babl_space ("sRGB"); + if (!name) { static int cnt = 0; @@ -873,7 +876,7 @@ const Babl *babl_new_palette (const char *name, const Babl **format_u8, const Babl **format_u8_with_alpha) { - return babl_new_palette_with_space (name, babl_space("sRGB"), + return babl_new_palette_with_space (name, NULL, format_u8, format_u8_with_alpha); } -- 2.30.2